2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 17:10:29 +01:00

scaffold single domain setup behind nginx

This commit is contained in:
Frederik Ring 2019-08-30 21:02:06 +02:00
parent c046e3de50
commit c21472128b

View File

@ -1,37 +1,18 @@
version: '3' version: '3'
services: services:
kms: proxy:
build: image: nginx:1.17-alpine
context: '.'
dockerfile: Dockerfile.golang
working_dir: /offen/kms
volumes: volumes:
- .:/offen - ./nginx.conf:/etc/nginx/nginx.conf
- kmsdeps:/go/pkg/mod - ./styles:/code/styles
environment:
KEY_FILE: key.txt
PORT: 8081
CORS_ORIGIN: http://localhost:9977
JWT_PUBLIC_KEY: http://accounts:5000/api/key
ports: ports:
- 8081:8081 - 8080:80
command: refresh run depends_on:
links: - server
- accounts - auditorium
- vault
server_database: - script
image: postgres:11.2
environment:
POSTGRES_PASSWORD: develop
accounts_database:
image: mysql:5.7
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: mysql
MYSQL_ROOT_PASSWORD: develop
server: server:
build: build:
@ -52,13 +33,14 @@ services:
DEVELOPMENT: '1' DEVELOPMENT: '1'
COOKIE_EXCHANGE_SECRET: Wsttdo4Z3mXV5sTc COOKIE_EXCHANGE_SECRET: Wsttdo4Z3mXV5sTc
EVENT_RETENTION_PERIOD: 4464h EVENT_RETENTION_PERIOD: 4464h
ports:
- 8080:8080
command: refresh run command: refresh run
links: links:
- server_database - server_database
depends_on:
- kms server_database:
image: postgres:11.2
environment:
POSTGRES_PASSWORD: develop
vault: vault:
build: build:
@ -69,13 +51,11 @@ services:
- .:/offen - .:/offen
- vaultdeps:/offen/vault/node_modules - vaultdeps:/offen/vault/node_modules
command: npm start -- --port 9977 command: npm start -- --port 9977
ports:
- 9977:9977
environment: environment:
- SERVER_HOST=http://localhost:8080 - SERVER_HOST=http://localhost:8080
- KMS_HOST=http://localhost:8081 - KMS_HOST=http://localhost:8081
- SCRIPT_HOST=http://localhost:9977 - SCRIPT_HOST=http://localhost:9977
- AUDITORIUM_HOST=http://localhost:9955 - AUDITORIUM_HOST=http://localhost:8080
- ACCOUNTS_HOST=http://localhost:5000 - ACCOUNTS_HOST=http://localhost:5000
- HOMEPAGE_HOST=http://localhost:8000 - HOMEPAGE_HOST=http://localhost:8000
@ -88,10 +68,8 @@ services:
- .:/offen - .:/offen
- scriptdeps:/offen/script/node_modules - scriptdeps:/offen/script/node_modules
command: npm start -- --port 9966 command: npm start -- --port 9966
ports:
- 9966:9966
environment: environment:
- VAULT_HOST=http://localhost:9977 - VAULT_HOST=http://localhost:8080/vault/
auditorium: auditorium:
build: build:
@ -102,38 +80,11 @@ services:
- .:/offen - .:/offen
- auditoriumdeps:/offen/auditorium/node_modules - auditoriumdeps:/offen/auditorium/node_modules
command: npm start -- --port 9955 command: npm start -- --port 9955
ports:
- 9955:9955
environment: environment:
- VAULT_HOST=http://localhost:9977 - VAULT_HOST=http://localhost:8080/vault/
accounts:
build:
context: '.'
dockerfile: Dockerfile.python
working_dir: /offen/accounts
volumes:
- .:/offen
- ./bootstrap.yml:/offen/accounts/bootstrap.yml
- accountdeps:/root/.local
command: flask run --host 0.0.0.0
ports:
- 5000:5000
links:
- accounts_database
environment:
CONFIG_CLASS: accounts.config.LocalConfig
FLASK_APP: accounts:app
FLASK_ENV: development
MYSQL_CONNECTION_STRING: mysql+pymysql://root:develop@accounts_database:3306/mysql
CORS_ORIGIN: http://localhost:9977
SERVER_HOST: http://server:8080
SESSION_SECRET: vndJRFJTiyjfgtTF
volumes: volumes:
kmsdeps:
serverdeps: serverdeps:
scriptdeps: scriptdeps:
auditoriumdeps: auditoriumdeps:
vaultdeps: vaultdeps:
accountdeps: