-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from wetfish/staging
Staging docker compose updates
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# version 3+ does different things re: networking from 2.x | ||
# mainly things to support swarms | ||
# aka things we don't need/want | ||
version: '2.4' | ||
services: | ||
online-staging-web: | ||
# staging: track "prod" tag on ghcr.io | ||
image: ghcr.io/wetfish/online:staging-nginx | ||
container_name: online-staging-web | ||
labels: | ||
- "com.centurylinklabs.watchtower.enable=true" | ||
restart: unless-stopped | ||
volumes: | ||
- ./storage/fish:/var/www/forum/fish | ||
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf | ||
# join online-internal and traefik-backend networks | ||
# comment out the traefik lines here and in the networks: stanza below | ||
# if you uncomment the port exposure above | ||
networks: | ||
online-staging-internal: {} | ||
traefik-backend: {} | ||
|
||
online-staging-php: | ||
# staging: track "prod" tag on ghcr.io | ||
image: ghcr.io/wetfish/online:staging-php | ||
container_name: online-staging-php | ||
labels: | ||
- "com.centurylinklabs.watchtower.enable=true" | ||
restart: unless-stopped | ||
env_file: | ||
- ./php.env | ||
volumes: | ||
- ./storage/fish:/var/www/forum/fish | ||
- ./config/php-fpm.conf:/etc/php/5.6/fpm/php-fpm.conf:ro | ||
- ./config/php-fpm-pool.conf:/etc/php/5.6/fpm/pool.d/www.conf:ro | ||
- ./config/php.ini:/etc/php/5.6/fpm/php.ini:ro | ||
networks: | ||
online-staging-internal: {} | ||
|
||
online-staging-db: | ||
image: docker.io/mariadb:10.10 | ||
container_name: online-staging-db | ||
restart: unless-stopped | ||
command: --sql_mode="" | ||
env_file: | ||
- ./mariadb.env | ||
volumes: | ||
- ./config/docker.sql:/docker-entrypoint-initdb.d/setup.sql | ||
- ./db/data:/var/lib/mysql | ||
networks: | ||
online-staging-internal: {} | ||
|
||
|
||
# watchtower - automatically pull new container images | ||
# note: this does not update the repo | ||
# if deployment files have changed you will need to git pull && docker compose up -d manually | ||
online-staging-watchtower: | ||
image: ghcr.io/containrrr/watchtower:1.5.3 | ||
container_name: online-staging-watchtower | ||
environment: | ||
- "WATCHTOWER_CLEANUP=true" | ||
- "WATCHTOWER_POLL_INTERVAL=30" | ||
- "WATCHTOWER_LABEL_ENABLE=true" | ||
- "NO_COLOR=true" | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock" | ||
|
||
networks: | ||
# ephemeral, created for us by compose | ||
online-staging-internal: | ||
driver: bridge | ||
# persistent, externally created | ||
traefik-backend: | ||
external: true | ||
|