-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (69 loc) · 2.08 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
version: "3"
services:
flat-backend:
# build:
# context: .
# dockerfile: ./Docker/rust/Dockerfile
# target: prod
image: t4t5u0/flat-backend:latest
container_name: flat
working_dir: /app
volumes:
- ./:/app
tty: true
environment:
USER: "flat"
CARGO_BUILD_TARGET_DIR: /target
# DATABASE_URL: mysql://docker:9Xu84SA1@mysql:3306/diesel_demo
SERAVICE_ACCOUNT: /path/to/service-account.json
BUCKET_NAME: icons_bucket
POSTGRES_USER: docker
POSTGRES_PASSWORD_FILE: /run/secrets/POSTGRES_PASSWORD_FILE
POSTGRES_DB: diesel_demo
POSTGRES_HOST: postgres
ports:
- 3000:3000
depends_on:
# - mysql
- postgres
command: ./scripts/start.sh
secrets:
- source: service_account_secrets
target: service-account.json
- source: POSTGRES_PASSWORD_FILE
target: POSTGRES_PASSWORD_FILE
# mysql:
# image: mysql:5.7
# environment:
# MYSQL_DATABASE: diesel_demo
# MYSQL_USER: docker
# MYSQL_PASSWORD_FILE: /run/secrets/MYSQL_PASSWORD_FILE
# MYSQL_ROOT_PASSWORD_FILE: /run/secrets/MYSQL_PASSWORD_FILE
# TZ: "Asia/Tokyo"
# # MYSQL_RANDOM_ROOT_PASSWORD: "yes"
# ports:
# - 3304:3304
# command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --sql_mode=''
# secrets:
# - source: MYSQL_PASSWORD_FILE
# target: MYSQL_PASSWORD_FILE
postgres:
image: postgres:14.4
environment:
POSTGRES_USER: docker
POSTGRES_PASSWORD_FILE: /run/secrets/POSTGRES_PASSWORD_FILE
POSTGRES_DB: diesel_demo
TZ: "Asia/Tokyo"
# POSTGRES_RANDOM_PASSWORD: "yes"
ports:
- 5432:5432
secrets:
- source: POSTGRES_PASSWORD_FILE
target: POSTGRES_PASSWORD_FILE
secrets:
service_account_secrets:
# file: secrets/beacon-fun-2021-flat-4db603e2850a.json
file: secrets/dummy.json
# MYSQL_PASSWORD_FILE:
POSTGRES_PASSWORD_FILE:
file: secrets/POSTGRES_PASSWORD_FILE.txt