-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yml
95 lines (73 loc) · 2.23 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
volumes:
postgres_data:
vscode_extensions:
vscode_insiders_extensions:
services:
# The default development container:
development: &app
image: icalialabs/sepomex-web:development
build: &app-build
context: .
dockerfile: Dockerfile
target: development
args:
DEVELOPER_UID: ${UID:-1000}
DEVELOPER_USERNAME: ${USER:-you}
volumes:
# Mount the app code into the app containers:
- .:/workspaces/sepomex
# Keep the stdin open, so we can attach to our app container's process
# and do things such as byebug, etc:
stdin_open: true
# Enable sending signals (CTRL+C, CTRL+P + CTRL+Q) into the container:
tty: true
# Required for ptrace-based debuggers like C++, Go, and Rust
cap_add:
- SYS_PTRACE
- NET_ADMIN
security_opt:
- seccomp:unconfined
entrypoint: /workspaces/sepomex/bin/dev-entrypoint
command: rails s -b 0.0.0.0
ports:
- ${SEPOMEX_WEB_PORT:-3000}:3000
# Specify environment variables available for our app containers. We'll
# leave a YML anchor in case we need to override or add more variables if
# needed on each app service:
environment: &app_env
RAILS_LOG_TO_STDOUT: "true"
DEBIAN_FRONTEND: dialog
# The tests container:
tests:
<<: *app
image: icalialabs/sepomex-web${TESTING_IMAGE_TAG:-:testing}
build:
<<: *app-build
target: testing
# The command we want to execute by default when running the container
command: rspec
ports: []
profiles: [ci, tests]
# This container is used by Visual Studio Code + Remote Container:
devcontainer:
<<: *app
ports: []
profiles: [vscode]
volumes:
- .:/workspaces/sepomex
- vscode_extensions:/home/${USER:-you}/.vscode-server/extensions
- vscode_insiders_extensions:/home/${USER:-you}/.vscode-server-insiders/extensions
environment:
<<: *app_env
VSCODE_CONTEXT: "yes"
# Use VSCode as editor:
EDITOR: code -w
staging-web:
<<: *app
image: icalialabs/sepomex-web:latest
build:
<<: *app-build
target: release
# The command we want to execute by default when running the container
command: rspec
profiles: [staging]