first deploy
works locally, production test in progress
This commit is contained in:
1 parent
daae92400d
commit
3e6e06779a
4 files changed
+184
No files matched your search
@@ -0,0 +1,59 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
app:
|
||||
container_name: ${SERVICE_NAME}_gitea
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- USER_GID=${USER_GID}
|
||||
- USER_UID=${USER_UID}
|
||||
image: ${GITEA_VERSION}
|
||||
labels:
|
||||
- traefik.docker.network=traefik-proxy
|
||||
- traefik.enable=true
|
||||
### Section HTTP
|
||||
- traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http
|
||||
- traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=8080
|
||||
# redirect to HTTPS only
|
||||
- traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https
|
||||
- traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_HOST}`)
|
||||
### Section HTTPS
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https
|
||||
- traefik.https.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=3000
|
||||
# configure the exposed service
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_HOST}`)
|
||||
# of course, enable TLS and it's certificate provider
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=true
|
||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=letsencrypt
|
||||
networks:
|
||||
- internal
|
||||
- traefik-proxy
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./gitea_data:/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
ports:
|
||||
- 3000:3000
|
||||
db:
|
||||
container_name: ${SERVICE_NAME}_mysql
|
||||
environment:
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
||||
- MYSQL_USER=${MYSQL_USER}
|
||||
image: ${MYSQL_VERSION}
|
||||
networks:
|
||||
- internal
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
|
||||
networks:
|
||||
internal:
|
||||
traefik-proxy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
database:
|
||||
Reference in new issue
Block a user