fix: update docker-compose for swarm compatibility with configs and overlay network
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m3s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m3s
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: gitea.blyzer.com.br/blyzer/fasto:latest
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3001:3001"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=3001
|
||||
@@ -12,18 +10,39 @@ services:
|
||||
- DB_USER=${DB_USER:-root}
|
||||
- DB_PASSWORD=${DB_PASSWORD:-root_password}
|
||||
- DB_NAME=${DB_NAME:-agenciac_comia}
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- "3001:3001"
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
networks:
|
||||
- fasto-net
|
||||
|
||||
db:
|
||||
image: mysql:8.0
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root_password}
|
||||
MYSQL_DATABASE: ${DB_NAME:-agenciac_comia}
|
||||
volumes:
|
||||
- ./agenciac_comia.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
- db_data:/var/lib/mysql
|
||||
configs:
|
||||
- source: init_sql
|
||||
target: /docker-entrypoint-initdb.d/init.sql
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
networks:
|
||||
- fasto-net
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
configs:
|
||||
init_sql:
|
||||
file: ./agenciac_comia.sql
|
||||
|
||||
networks:
|
||||
fasto-net:
|
||||
driver: overlay
|
||||
|
||||
Reference in New Issue
Block a user