-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.dev.yml
78 lines (73 loc) · 1.75 KB
/
docker-compose.dev.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
68
69
70
71
72
73
74
75
76
77
78
services:
vpn_client:
image: dperson/openvpn-client
container_name: vpn_client
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
environment:
- OPENVPN_USERNAME=${OPENVPN_USERNAME}
- OPENVPN_PASSWORD=${OPENVPN_PASSWORD}
stdin_open: true # docker run -i
tty: true
volumes:
- ../.vpn:/vpn # Assuming your VPN config file is in a folder called 'vpn'
command: '-f ./vpn/${OPENVPN_CONFIG_FILE}'
networks:
- vpn_network
env_file:
- .env
db_dev: &db_dev
image: postgres:15.7-bullseye
shm_size: '512MB'
volumes:
- db_data_dev:/var/lib/postgresql/data
- .pgpass:/root/.pgpass
- ./backups:/backups
ports:
- "5432:5432"
depends_on:
- vpn_client
networks:
- vpn_network
environment:
POSTGRES_DB: ${POSTGRES_DB_DEV}
POSTGRES_USER: ${POSTGRES_USER_DEV}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD_DEV}
env_file:
- .env
app_dev: &app_dev
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
volumes:
- .:/app
- gem_cache:/usr/local/bundle/gems
stdin_open: true # docker run -i
tty: true
environment:
DB_USERNAME: ${POSTGRES_USER_DEV}
DB_PASSWORD: ${POSTGRES_PASSWORD_DEV}
DB_NAME: ${POSTGRES_DB_DEV}
EDITOR_CONFIG_FILE: ${EDITOR_CONFIG_FILE}
EDITOR_CONFIGDB_FILE: ${EDITOR_CONFIGDB_FILE}
DB_HOST: db_dev
RAILS_ENV: development
env_file:
- .env
depends_on:
- db_dev
links:
- db_dev
networks:
- vpn_network
command: bash -c "rm -f ./tmp/pids/server.pid && bundle exec rails server -b 0.0.0.0 -p 3000"
volumes:
gem_cache:
db_data_dev:
networks:
vpn_network:
driver: bridge