-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
61 lines (61 loc) · 1.62 KB
/
docker-compose.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
version: "3"
services:
app:
build: .
image: soft-sec
container_name: soft_sec
environment:
PORT: "${APP_PORT}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_PORT: "${POSTGRES_PORT}"
POSTGRES_HOST: "${POSTGRES_HOST}"
ports:
- "${APP_PORT}:${APP_PORT}"
volumes:
- ./:/app
postgres:
image: postgres:15.6-alpine
container_name: soft_sec_db
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_PORT: "${POSTGRES_PORT}"
ports:
- "${POSTGRES_PORT}:5433"
command: -p 5433 -c max_connections=200
mailpit:
image: axllent/mailpit:latest
ports:
- "1025:1025"
- "8025:8025"
migrate-up:
image: migrate/migrate
container_name: soft_sec_migrate_up
depends_on:
- postgres
volumes:
- ./core/migrations:/migrations
command: [
"-path",
"/migrations",
"-database",
"postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable",
"up"]
migrate-drop:
image: migrate/migrate
container_name: soft_sec_migrate_drop
depends_on:
- postgres
volumes:
- ./core/migrations:/migrations
command: [
"-path",
"/migrations",
"-database",
"postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable",
"drop",
"-f"]