-
Notifications
You must be signed in to change notification settings - Fork 0
/
Docker-compose.yml
52 lines (49 loc) · 1.17 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
services:
production-rw_db:
container_name: production-rw_db
image: postgres:14.10
restart: always
env_file:
- .env
logging:
driver: 'json-file'
options:
max-size: '5m'
max-file: '1'
ports:
- ${POSTGRES_HOST_PORT}:${POSTGRES_CONTAINER_PORT}
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
TZ: ${POSTGRES_TZ}
volumes:
- ./db_criacao/configura_banco_de_dados_rapido/criar/init.sql:/docker-entrypoint-initdb.d/init.sql
- production-rw_postgres:/var/lib/postgresql/data
networks:
- production-rw_network
production-rw_python:
container_name: production-rw_python
image: python:3.11
restart: always
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
logging:
driver: 'json-file'
options:
max-size: '5m'
max-file: '1'
depends_on:
- production-rw_db
volumes:
- .:/home/myuser/code
networks:
- production-rw_network
volumes:
production-rw_postgres:
networks:
production-rw_network:
external: true