-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-deploy.yml
77 lines (73 loc) · 1.72 KB
/
docker-compose-deploy.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: "3.8"
services:
frontend:
image: eddiethecubehead/stagnum_client:master
restart: always
ports:
- ${FRONTEND_PORT}:80
networks:
- outgoing
- internal
environment:
VITE_BACKEND_URL: ${VITE_BACKEND_URL}
VITE_FRONTEND_URL: ${VITE_FRONTEND_URL}
depends_on:
backend:
condition: service_healthy
env_file:
- .env
backend:
image: eddiethecubehead/stagnum_server:master
restart: always
ports:
- ${BACKEND_PORT}:8080
depends_on:
database:
condition: service_healthy
networks:
- outgoing
- internal
environment:
DATABASE_CONNECTION_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:${DATABASE_PORT}/${POSTGRES_DB}
VERBOSE_SQLALCHEMY: false
CORS_ORIGINS: "*"
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8080/health/ || exit 1" ]
interval: 10s
timeout: 30s
retries: 5
start_period: 30s
secrets:
- spotify_client_id
- spotify_client_secret
env_file:
- .env
database:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d ${POSTGRES_DB}" ]
interval: 10s
timeout: 30s
retries: 5
start_period: 30s
ports:
- ${DATABASE_PORT}:5432
networks:
- internal
env_file:
- .env
secrets:
spotify_client_id:
file: ./secret_spotify_client_id.txt
spotify_client_secret:
file: ./secret_spotify_client_secret.txt
networks:
outgoing:
driver: bridge
internal:
driver: bridge