-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (45 loc) · 1.11 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: "3.8"
services:
postgres_db:
container_name: core_pg_db
image: postgres:13-alpine
environment:
- POSTGRES_USER=${MASTER_DB_USER}
- POSTGRES_PASSWORD=${MASTER_DB_PASSWORD}
- POSTGRES_DB=${MASTER_DB_NAME}
volumes:
- prod_postgres_data:/var/lib/postgresql/data/
restart: always
server:
container_name: go_server
build:
context: .
dockerfile: Dockerfile
ports:
- ${SERVER_PORT}:${SERVER_PORT}
depends_on:
- postgres_db
links:
- postgres_db:postgres_db
volumes:
- app_logs:/app_logs
restart: on-failure
frontend-builder:
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend:/app # Mount the build directory to the container
command: sh -c "GOARCH=wasm GOOS=js go build -o web/app.wasm && go build -o frontend && ./frontend"
nginx:
build: "./nginx"
ports:
- "80:80"
depends_on:
- server
volumes:
- ./frontend:/usr/share/nginx/html/frontend
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
volumes:
prod_postgres_data:
app_logs: