-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (59 loc) · 1.29 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
61
62
63
64
65
66
67
version: '3.8'
services:
development:
build:
context: ./src
dockerfile: ../docker/development.Dockerfile
args:
USERNAME: ${USER:-dev}
USER_UID: ${UID:-1000}
USER_GID: ${GID:-1000}
volumes:
- .:/code
- $HOME/.ssh:$HOME/.ssh:ro
- $HOME/.gitconfig:$HOME/.gitconfig:cached
- $HOME/.bashrc:$HOME/.bashrc:ro
env_file:
- ./src/.env
depends_on:
- postgres
networks:
- development
app_api:
build:
context: ./src
dockerfile: ../docker/app.Dockerfile
env_file:
- ./src/.env
depends_on:
- postgres
- app_server
networks:
- development
app_server:
image: nginx:stable-alpine
ports:
- "8001:80"
volumes:
- ./docker/configurations/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- app_api
networks:
- development
postgres:
image: postgres:13.6-alpine
restart: on-failure
volumes:
- pgdata:/var/lib/postgresql/data
- ./docker/data/postgres-init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: secret
POSTGRES_DB: test_db
networks:
- development
volumes:
pgdata:
networks:
development:
driver: bridge