-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yaml
81 lines (76 loc) · 1.6 KB
/
docker-compose-dev.yaml
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
78
79
80
81
version: '3.9'
services:
app:
container_name: titw_go_server
build:
context: ./golang
dockerfile: Dockerfile
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- DATABASE_HOST=${DB_HOST}
- DATABASE_PORT=${DB_PORT}
- TZ=GMT+1
tty: true
ports:
- 8080:8080
restart: always
volumes:
- ./golang:/app
- ./storage:/app/storage
- ./import:/import
- ./logs:/app/logs
depends_on:
- goose
- postgresdb
networks:
- titw
goose:
container_name: titw_go_goose
build:
context: ./golang
dockerfile: Dockerfile.goose
volumes:
- ./import:/import
depends_on:
- postgresdb
networks:
- titw
cron:
container_name: titw_go_cron
build:
context: ./golang
dockerfile: Dockerfile.cron
environment:
- TZ=GMT+1
volumes:
- ./import:/import
- ./logs:/app/logs
depends_on:
- goose
- postgresdb
networks:
- titw
postgresdb:
image: postgres:latest
container_name: titw_postgres
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- DATABASE_HOST=${DB_HOST}
- TZ="Europe/Rome"
ports:
- '2345:5432'
volumes:
- pg_data:/var/lib/postgresql/data
command: postgres -c 'max_connections=500'
networks:
- titw
volumes:
pg_data:
# Networks to be created to facilitate communication between containers
networks:
titw:
driver: bridge