-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
61 lines (56 loc) · 1.58 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
51
52
53
54
55
56
57
58
59
60
version: '3.8'
services:
rust.server:
build:
context: ./rust.server
dockerfile: Dockerfile.prod
restart: unless-stopped
volumes:
- ./rust.server/src:/app/src
ports:
- "8888:8888"
fastapi_sample_server:
container_name: fastapi_sample_server
build: ./backend
restart: always
command: "sh -c 'alembic upgrade head && gunicorn -w 3 -k uvicorn.workers.UvicornWorker app.main:app --bind 0.0.0.0:8000 --preload --log-level=debug --timeout 120'"
volumes:
- ./backend/app:/code
expose:
- 8000
ports:
- "8000:8000"
env_file: ".env"
depends_on:
- database
database:
image: bitnami/postgresql:13.3.0
restart: always
container_name: database_sample
env_file: ".env"
user: root
volumes:
- ./db_docker:/bitnami/postgresql
ports:
- 5454:5432 # Remove this on production
expose:
- 5432
environment:
- POSTGRES_USERNAME=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_DATABASE=${DATABASE_NAME}
- POSTGRES_HOST_AUTH_METHOD= "trust"
- POSTGRESQL_POSTGRES_PASSWORD= ${DATABASE_PASSWORD}
nginx:
container_name: nginx_sample
restart: unless-stopped
logging:
driver: none
image: "nginx:latest"
ports:
- "80:8080"
volumes:
- ./static:/code/static
- ./nginx-config-files/nginx.conf:/etc/nginx/nginx.conf
- ./nginx-config-files/app.nginx.template:/etc/nginx/templates/app.nginx.template
- "${EB_LOG_BASE_DIR:-./nginx-config-files}/nginx-proxy:/var/log/nginx"