2020-03-05 17:40:44 +00:00
|
|
|
services:
|
|
|
|
backend:
|
|
|
|
build:
|
|
|
|
args:
|
|
|
|
- NODE_ENV=development
|
|
|
|
context: backend
|
2020-03-24 09:48:45 +00:00
|
|
|
command: npm run start-watch
|
2020-03-05 17:40:44 +00:00
|
|
|
environment:
|
2020-03-24 09:48:45 +00:00
|
|
|
- DATABASE_DB=example
|
|
|
|
- DATABASE_USER=root
|
|
|
|
- DATABASE_PASSWORD=/run/secrets/db-password
|
|
|
|
- DATABASE_HOST=db
|
2020-03-23 12:24:37 +00:00
|
|
|
- NODE_ENV=development
|
2020-03-05 17:40:44 +00:00
|
|
|
ports:
|
2020-03-23 23:36:46 +00:00
|
|
|
- 80:80
|
2020-03-23 12:24:37 +00:00
|
|
|
- 9229:9229
|
|
|
|
- 9230:9230
|
2020-03-24 09:48:45 +00:00
|
|
|
secrets:
|
|
|
|
- db-password
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
2020-03-24 09:48:45 +00:00
|
|
|
- ./backend/src:/code/src:ro
|
|
|
|
- ./backend/package.json:/code/package.json
|
|
|
|
- ./backend/package-lock.json:/code/package-lock.json
|
2020-03-23 12:24:37 +00:00
|
|
|
- back-notused:/opt/app/node_modules
|
|
|
|
networks:
|
|
|
|
- public
|
|
|
|
- private
|
|
|
|
depends_on:
|
2020-03-05 17:40:44 +00:00
|
|
|
- db
|
|
|
|
db:
|
2021-11-08 10:41:35 +00:00
|
|
|
# We use a mariadb image which supports both amd64 & arm64 architecture
|
|
|
|
image: mariadb:10.6.4-focal
|
|
|
|
# If you really want to use MySQL, uncomment the following line
|
|
|
|
#image: mysql:8.0.27
|
2020-03-23 23:36:46 +00:00
|
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
2020-03-05 17:40:44 +00:00
|
|
|
restart: always
|
|
|
|
secrets:
|
2020-03-23 12:24:37 +00:00
|
|
|
- db-password
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
2020-03-23 12:24:37 +00:00
|
|
|
- db-data:/var/lib/mysql
|
|
|
|
networks:
|
|
|
|
- private
|
2020-03-23 23:36:46 +00:00
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=example
|
|
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
|
2020-03-05 17:40:44 +00:00
|
|
|
frontend:
|
2020-03-23 12:24:37 +00:00
|
|
|
build:
|
|
|
|
context: frontend
|
|
|
|
target: development
|
2020-03-05 17:40:44 +00:00
|
|
|
ports:
|
2020-03-23 23:36:46 +00:00
|
|
|
- 3000:3000
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
2020-03-23 12:24:37 +00:00
|
|
|
- ./frontend/src:/code/src
|
|
|
|
- /code/node_modules
|
|
|
|
networks:
|
|
|
|
- public
|
|
|
|
depends_on:
|
|
|
|
- backend
|
|
|
|
networks:
|
2020-03-23 23:36:46 +00:00
|
|
|
public:
|
|
|
|
private:
|
2020-03-05 17:40:44 +00:00
|
|
|
volumes:
|
2020-03-23 23:36:46 +00:00
|
|
|
back-notused:
|
|
|
|
db-data:
|
2020-03-05 17:40:44 +00:00
|
|
|
secrets:
|
|
|
|
db-password:
|
|
|
|
file: db/password.txt
|