You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.5 KiB
YAML
68 lines
1.5 KiB
YAML
5 years ago
|
services:
|
||
|
backend:
|
||
|
build:
|
||
|
args:
|
||
|
- NODE_ENV=development
|
||
|
context: backend
|
||
5 years ago
|
command: npm run start-watch
|
||
5 years ago
|
environment:
|
||
5 years ago
|
- DATABASE_DB=example
|
||
|
- DATABASE_USER=root
|
||
|
- DATABASE_PASSWORD=/run/secrets/db-password
|
||
|
- DATABASE_HOST=db
|
||
5 years ago
|
- NODE_ENV=development
|
||
5 years ago
|
ports:
|
||
5 years ago
|
- 80:80
|
||
5 years ago
|
- 9229:9229
|
||
|
- 9230:9230
|
||
5 years ago
|
secrets:
|
||
|
- db-password
|
||
5 years ago
|
volumes:
|
||
5 years ago
|
- ./backend/src:/code/src:ro
|
||
|
- ./backend/package.json:/code/package.json
|
||
|
- ./backend/package-lock.json:/code/package-lock.json
|
||
5 years ago
|
- back-notused:/opt/app/node_modules
|
||
|
networks:
|
||
|
- public
|
||
|
- private
|
||
|
depends_on:
|
||
5 years ago
|
- db
|
||
|
db:
|
||
3 years ago
|
# 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
|
||
5 years ago
|
command: '--default-authentication-plugin=mysql_native_password'
|
||
5 years ago
|
restart: always
|
||
|
secrets:
|
||
5 years ago
|
- db-password
|
||
5 years ago
|
volumes:
|
||
5 years ago
|
- db-data:/var/lib/mysql
|
||
|
networks:
|
||
|
- private
|
||
5 years ago
|
environment:
|
||
|
- MYSQL_DATABASE=example
|
||
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
|
||
5 years ago
|
frontend:
|
||
5 years ago
|
build:
|
||
|
context: frontend
|
||
|
target: development
|
||
5 years ago
|
ports:
|
||
5 years ago
|
- 3000:3000
|
||
5 years ago
|
volumes:
|
||
5 years ago
|
- ./frontend/src:/code/src
|
||
|
- /code/node_modules
|
||
|
networks:
|
||
|
- public
|
||
|
depends_on:
|
||
|
- backend
|
||
|
networks:
|
||
5 years ago
|
public:
|
||
|
private:
|
||
5 years ago
|
volumes:
|
||
5 years ago
|
back-notused:
|
||
|
db-data:
|
||
5 years ago
|
secrets:
|
||
|
db-password:
|
||
|
file: db/password.txt
|