Skip to content

Commit 99aadfe

Browse files
committed
fix(docker-compose): env
1 parent 18574ca commit 99aadfe

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ADMIN_USERNAME=albatross
22
ADMIN_PASSWORD=albatross
3-
DB_URL=/Users/kevinzhow/Github/albatross/testing.sqlite
3+
DB_URL=/Users/kevinzhow/Github/albatross/data/dev.sqlite

docker-compose.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,52 @@
1414
#
1515
version: '3.7'
1616

17-
x-shared_environment: &shared_environment
17+
x-shared_environment:
18+
&shared_environment
1819
LOG_LEVEL: ${LOG_LEVEL:-debug}
19-
20+
ADMIN_USERNAME: albatross
21+
ADMIN_PASSWORD: albatross
22+
DB_URL: /app/data/db.sqlite
23+
2024
services:
2125
app:
2226
image: albatross:latest
2327
build:
2428
context: .
2529
environment:
2630
<<: *shared_environment
31+
depends_on:
32+
- migrate
2733
ports:
2834
- '8080:8080'
35+
volumes:
36+
- ./data:/app/data
2937
# user: '0' # uncomment to run as root for testing purposes even though Dockerfile defines 'vapor' user.
30-
command: ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]
38+
command:
39+
[
40+
"serve",
41+
"--env",
42+
"production",
43+
"--hostname",
44+
"0.0.0.0",
45+
"--port",
46+
"8080"
47+
]
3148
migrate:
3249
image: albatross:latest
3350
build:
3451
context: .
3552
environment:
3653
<<: *shared_environment
37-
command: ["migrate", "--yes"]
38-
deploy:
39-
replicas: 0
54+
command: [ "migrate", "--yes" ]
55+
# deploy:
56+
# replicas: 0
4057
revert:
4158
image: albatross:latest
4259
build:
4360
context: .
4461
environment:
4562
<<: *shared_environment
46-
command: ["migrate", "--revert", "--yes"]
63+
command: [ "migrate", "--revert", "--yes" ]
4764
deploy:
4865
replicas: 0

0 commit comments

Comments
 (0)